.acb-widget-trigger-btn {
  padding: 4px !important;
  position: fixed !important;
  border-radius: 100% !important;
  z-index: 2147483646 !important;
  border: none !important;
  cursor: pointer !important;
}

.acb-widget-trigger-btn.large {
  width: 60px;
  height: 60px;
}

.acb-widget-trigger-btn.medium {
  width: 48px;
  height: 48px;
}

.acb-widget-trigger-btn.small {
  width: 34px;
  height: 34px;
}

.acb-widget-trigger-btn:hover {
  opacity: 0.8;
  background-color: currentColor;
}

.acb-widget-trigger-btn:focus-visible {
  padding: 8px;
  outline: none;
  background-color: #f8fafc;
  box-shadow: 0 0 0 6px skyblue;
}

.acb-widget-trigger-btn.top-left {
  top: 24px;
  left: 24px;
}

.acb-widget-trigger-btn.top-center {
  top: 24px;
  left: 50%;
}

.acb-widget-trigger-btn.top-right {
  top: 24px;
  right: 24px;
}

.acb-widget-trigger-btn.mid-left {
  top: 50%;
  left: 24px;
}

.acb-widget-trigger-btn.mid-right {
  top: 50%;
  right: 24px;
}

.acb-widget-trigger-btn.bottom-left {
  bottom: 24px;
  left: 24px;
}

.acb-widget-trigger-btn.bottom-right {
  bottom: 24px;
  right: 24px;
}

.acb-widget-trigger-btn.bottom-center {
  bottom: 24px;
  left: 50%;
}

.acb-widget-trigger-btn img {
  width: 100%;
  height: 100%;
}

.acb-widget-trigger-btn .check-mark-icon {
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  position: absolute;
}

.acb-widget-frame {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  margin: 0;
  overflow: hidden;
  z-index: 2147483647;
  background-color: transparent;
}

.acb-widget-frame.acb-widget-frame-right {
  right: 0;
  left: auto;
}

.acb-widget-frame.acb-widget-frame-left {
  left: 0;
  right: auto;
}

@media (min-width: 640px) {
  .acb-widget-frame {
    width: 535px;
  }
}

.acb-widget-reading-guide {
  position: fixed;
  top: 80px;
  transform: translate(-50%, -50%);
  z-index: 2147483647;
  width: 40vw;
  max-width: 100vw;
  height: 18px;
  background: linear-gradient(90deg, #2a75ff 0%, #175cff 52%, #0d49df 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  box-shadow:
    0 10px 24px rgba(23, 92, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

.acb-widget-reading-guide .acb-widget-reading-guide-arrow {
  width: 14px;
  height: 14px;
  top: -7px;
  left: var(--acb-reading-guide-arrow-left, 50%);
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
  background: linear-gradient(135deg, #2a75ff 0%, #175cff 52%, #0d49df 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.acb-widget-reading-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 0;
  z-index: 2147483647;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.5);
}

.acb-widget-reading-mask.top {
  border-bottom: 8px solid #175cff;
}

.acb-widget-reading-mask.bottom {
  border-top: 8px solid #175cff;
}

.whitespace-break-spaces {
  white-space: break-spaces;
}

.page-summary-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(0, 0, 0, 0.08),
      transparent
    ),
    radial-gradient(circle at 80% 0%, rgba(0, 0, 0, 0.08), transparent),
    rgba(15, 23, 42, 0.35);
  overflow: auto;
}

.page-summary-modal-content {
  position: relative;
  background-color: #f8fafc;
  margin: auto;
  padding: 0;
  width: min(720px, 90vw);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 70px rgba(15, 23, 42, 0.18),
    0 12px 28px rgba(15, 23, 42, 0.18);
  -webkit-animation-name: animatetop;
  -webkit-animation-duration: 0.35s;
  animation-name: animatetop;
  animation-duration: 0.35s;
}

.page-summary-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.page-summary-header-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.page-summary-close {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

.page-summary-close:focus-visible {
  outline: 3px solid #175cff;
  outline-offset: 2px;
}

.page-summary-close:hover,
.page-summary-close:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
  border-color: #cbd5e1;
  background: #fff;
}

.page-summary-modal-body {
  padding: 20px;
}

.page-summary-body-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  max-height: 60vh;
  overflow: auto;
}

.page-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 12px;
  background: #ecfdf3;
  color: #15803d;
  border: 1px solid #c2f1d6;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.page-summary-content {
  color: #1f2933;
  font-size: 16px;
  line-height: 1.6;
  display: grid;
  gap: 10px;
}

.page-summary-content h1,
.page-summary-content h2,
.page-summary-content h3,
.page-summary-content h4,
.page-summary-content h5,
.page-summary-content h6 {
  margin: 8px 0 4px;
  font-weight: 700;
  color: #0f172a;
}

.page-summary-content h1 {
  font-size: 24px;
}

.page-summary-content h2 {
  font-size: 20px;
}

.page-summary-content h3 {
  font-size: 18px;
}

.page-summary-content p {
  margin: 0;
}

.page-summary-content ul,
.page-summary-content ol {
  margin: 0 0 0 20px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.page-summary-content li {
  margin-left: 4px;
}

.page-summary-content a {
  color: #175cff;
  text-decoration: underline;
}

.page-summary-content blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid #175cff;
  background: #f5f8ff;
  border-radius: 4px;
  color: #0f172a;
}

.page-summary-content code {
  background: #f1f3f5;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
}

.page-summary-content pre {
  background: #0f172a;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}

.page-summary-modal-body .loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #175cff;
  animation: loader-bounce 0.9s infinite ease-in-out;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.12s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.24s;
}

@media (max-width: 768px) {
  .acb-widget-trigger-btn.top-left {
    top: 5px;
    left: 5px;
  }

  .acb-widget-trigger-btn.top-center {
    top: 5px;
    left: 50%;
  }

  .acb-widget-trigger-btn.top-right {
    top: 5px;
    right: 24px;
  }

  .acb-widget-trigger-btn.mid-left {
    top: 50%;
    left: 5px;
  }

  .acb-widget-trigger-btn.mid-right {
    top: 50%;
    right: 5px;
  }

  .acb-widget-trigger-btn.bottom-left {
    bottom: 5px;
    left: 5px;
  }

  .acb-widget-trigger-btn.bottom-right {
    bottom: 5px;
    right: 5px;
  }

  .acb-widget-trigger-btn.bottom-center {
    bottom: 5px;
    left: 50%;
  }

  .page-summary-modal {
    padding: 16px 10px;
  }

  .page-summary-modal-content {
    width: 100%;
    border-radius: 12px;
  }

  .page-summary-modal-header {
    padding: 12px 14px;
  }

  .page-summary-body-card {
    max-height: 65vh;
  }
}

@-webkit-keyframes animatetop {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

@keyframes animatetop {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

@keyframes loader-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}
